import Vue from 'vue'
import axios from "axios";

// axios.defaults.baseURL = "http://127.0.0.1:8888/api/private/v1/" //基准路径
axios.defaults.baseURL = "http://127.0.0.1:8888/api/private/v1/"
Vue.prototype.$axios = axios

//设置请求拦截守卫
axios.interceptors.request.use(function(config) {
    if(localStorage.getItem('myToken')) {
        config.headers.Authorization = localStorage.getItem('myToken')
    }
    return config
}),function (error) {
    return Promise.reject(error)
}



